{include file="public/header"}

<body>
    <div class="layui-fluid">
        <div class="layui-row">
            <form action="" method="post" class="layui-form layui-form-pane">
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">配置名</div>
                    <div class="layui-card-body layui-row layui-col-space10">
                        <div class="layui-col-md12">
                            <input type="text" value="{$row.name|default=''}" required="" lay-verify="required"
                                autocomplete="off" class="layui-input" disabled>
                        </div>
                    </div>
                </div>
                {if !empty($row.key_value) && $row.key_value == 'ptdatas'}
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">平台总交易额</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">初始金额(元)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小金额(元)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大金额(元)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[total][money]"
                                                value="{$row.value.total.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[total][time]"
                                                value="{$row.value.total.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[total][min]"
                                                value="{$row.value.total.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[total][max]"
                                                value="{$row.value.total.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">平台总用户</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">初始用户(人)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小人数(人)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大人数(人)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[user][money]"
                                                value="{$row.value.user.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[user][time]"
                                                value="{$row.value.user.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[user][min]"
                                                value="{$row.value.user.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[user][max]"
                                                value="{$row.value.user.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">初始活跃用户(人)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小人数(人)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大人数(人)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[huser][money]"
                                                value="{$row.value.huser.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[huser][time]"
                                                value="{$row.value.huser.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[huser][min]"
                                                value="{$row.value.huser.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[huser][max]"
                                                value="{$row.value.huser.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">月度趋势数据</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-btn layui-btn layui-btn-sm-sm layui-btn layui-btn-sm-normal"
                                onclick="addtable2()">添加数据</a>
                            <table class="layui-table layui-form" id="table2" lay-filter="table2">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">日期</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">涨幅百分比</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">操作</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {if !empty($row.value.order)}
                                    {foreach $row.value.order as $k => $v}
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[order][{$k}][key]" value="{$v.key}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[order][{$k}][value]" value="{$v.value}">
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del">删除</a>
                                        </div></td>
                                    </tr>
                                    {/foreach}
                                    {/if}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">订单趋势数据</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">月用户访问量(次)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小人数(次)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大人数(次)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fwnumber][money]"
                                                value="{$row.value.fwnumber.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fwnumber][time]"
                                                value="{$row.value.fwnumber.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fwnumber][min]"
                                                value="{$row.value.fwnumber.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fwnumber][max]"
                                                value="{$row.value.fwnumber.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">月新增订单量(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小单数(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大单数(单)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[xznumber][money]"
                                                value="{$row.value.xznumber.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[xznumber][time]"
                                                value="{$row.value.xznumber.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[xznumber][min]"
                                                value="{$row.value.xznumber.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[xznumber][max]"
                                                value="{$row.value.xznumber.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">月完成订单量(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小单数(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大单数(单)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fnnumber][money]"
                                                value="{$row.value.fnnumber.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fnnumber][time]"
                                                value="{$row.value.fnnumber.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fnnumber][min]"
                                                value="{$row.value.fnnumber.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fnnumber][max]"
                                                value="{$row.value.fnnumber.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">订单累计数据</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">待付款订单总量(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小单数(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大单数(单)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber0][money]"
                                                value="{$row.value.fallnnumber0.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber0][time]"
                                                value="{$row.value.fallnnumber0.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber0][min]"
                                                value="{$row.value.fallnnumber0.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber0][max]"
                                                value="{$row.value.fallnnumber0.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">待服务订单总量(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小单数(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大单数(单)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber1][money]"
                                                value="{$row.value.fallnnumber1.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber1][time]"
                                                value="{$row.value.fallnnumber1.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber1][min]"
                                                value="{$row.value.fallnnumber1.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber1][max]"
                                                value="{$row.value.fallnnumber1.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">服务中订单总量(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小单数(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大单数(单)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber2][money]"
                                                value="{$row.value.fallnnumber2.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber2][time]"
                                                value="{$row.value.fallnnumber2.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber2][min]"
                                                value="{$row.value.fallnnumber2.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber2][max]"
                                                value="{$row.value.fallnnumber2.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                        <div class="layui-col-md12">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">总完成订单量(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间频率(秒)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最小单数(单)</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">变化最大单数(单)</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber3][money]"
                                                value="{$row.value.fallnnumber3.money|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber3][time]"
                                                value="{$row.value.fallnnumber3.time|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber3][min]"
                                                value="{$row.value.fallnnumber3.min|default=0}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[fallnnumber3][max]"
                                                value="{$row.value.fallnnumber3.max|default=0}">
                                        </div></td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">饼状图数据</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-btn layui-btn layui-btn-sm-sm layui-btn layui-btn-sm-normal"
                                onclick="addtable3()">添加数据</a>
                            <table class="layui-table layui-form" id="table3" lay-filter="table3">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">类名</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">占百分比</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">操作</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {if !empty($row.value.shop)}
                                    {foreach $row.value.shop as $k => $v}
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="text" id="layui-input"
                                                class="layui-input" name="value[shop][{$k}][key]" value="{$v.key}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[shop][{$k}][value]" value="{$v.value}">
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del">删除</a>
                                        </div></td>
                                    </tr>
                                    {/foreach}
                                    {/if}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">刷订单数据</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-btn layui-btn layui-btn-sm-sm layui-btn layui-btn-sm-normal"
                                onclick="addtable4()">添加数据</a>
                            <table class="layui-table layui-form" id="table4" lay-filter="table4">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">用户名</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">手机号</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">操作</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {if !empty($row.value.orderuser)}
                                    {foreach $row.value.orderuser as $k => $v}
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="text" id="layui-input"
                                                class="layui-input" name="value[orderuser][{$k}][key]" value="{$v.key}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[orderuser][{$k}][value]"
                                                value="{$v.value}">
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del">删除</a>
                                        </div></td>
                                    </tr>
                                    {/foreach}
                                    {/if}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-card layui-form" lay-filter="component-form-element">
                    <div class="layui-card-header">月平均数据</div>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <div class="layui-col-md12">
                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-btn layui-btn layui-btn-sm-sm layui-btn layui-btn-sm-normal"
                                onclick="addtable5()">添加数据</a>
                            <table class="layui-table layui-form" id="table5" lay-filter="table5">
                                <thead>
                                    <tr>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">类目名称</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">基础数量</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">更新时间间隔</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">最小值</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">最大值</div>
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <div class="layui-table-cell">操作</div>
                                        </div></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {if !empty($row.value.monethclass)}
                                    {foreach $row.value.monethclass as $k => $v}
                                    <tr>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="text" id="layui-input"
                                                class="layui-input" name="value[monethclass][{$k}][key]"
                                                value="{$v.key}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[monethclass][{$k}][value]"
                                                value="{$v.value}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[monethclass][{$k}][times]"
                                                value="{$v.times}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[monethclass][{$k}][min]"
                                                value="{$v.min}">
                                        </div></td>
                                        <td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input"
                                                class="layui-input" name="value[monethclass][{$k}][max]"
                                                value="{$v.max}">
                                        </div></td>
                                        <td><div class="layui-table-cell">
                                            <a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del">删除</a>
                                        </div></td>
                                    </tr>
                                    {/foreach}
                                    {/if}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                {/if}
                <div class="layui-form-item">
                    <input type="hidden" value="{$row['key_value']|default=''}" name="key_value" />
                    <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="add">提交</button>
                </div>
            </form>
        </div>
    </div>
    {include file="public/footer"}
    <script src="/static/leyedit/Layui-KnifeZ/layui.all.js"></script>
    <script src="/static/leyedit/ace/ace.js"></script>
    <script>
        function addtable2() {
            var i = $('#table2 tbody tr').length;
            //你要添加的html
            var html = '<tr>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[order][' + i + '][key]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[order][' + i + '][value]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del" >删除</a></div></td></tr>';
            $(html).appendTo($('#table2 tbody:last'));
            layui.use(['form'], function () {
                $ = layui.jquery;
                var form = layui.form;
                form.render();
            });
        };
        function addtable3() {
            var i = $('#table3 tbody tr').length;
            //你要添加的html
            var html = '<tr>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="text" id="layui-input" class="layui-input" name="value[shop][' + i + '][key]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[shop][' + i + '][value]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del" >删除</a></div></td></tr>';
            $(html).appendTo($('#table3 tbody:last'));
            layui.use(['form'], function () {
                $ = layui.jquery;
                var form = layui.form;
                form.render();
            });
        };
        function addtable4() {
            var i = $('#table4 tbody tr').length;
            //你要添加的html
            var html = '<tr>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="text" id="layui-input" class="layui-input" name="value[orderuser][' + i + '][key]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[orderuser][' + i + '][value]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del" >删除</a></div></td></tr>';
            $(html).appendTo($('#table4 tbody:last'));
            layui.use(['form'], function () {
                $ = layui.jquery;
                var form = layui.form;
                form.render();
            });
        };
        function addtable5() {
            var i = $('#table5 tbody tr').length;
            //你要添加的html
            var html = '<tr>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="text" id="layui-input" class="layui-input" name="value[monethclass][' + i + '][key]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[monethclass][' + i + '][value]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[monethclass][' + i + '][times]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[monethclass][' + i + '][min]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><input required="" lay-verify="required" type="number" id="layui-input" class="layui-input" name="value[monethclass][' + i + '][max]" value=""></div></td>' +
                '<td><div class="layui-table-cell"><a class="layui-btn layui-btn-sm layui-btn layui-btn-sm-danger layui-btn layui-btn-sm-xs del" >删除</a></div></td></tr>';
            $(html).appendTo($('#table5 tbody:last'));
            layui.use(['form'], function () {
                $ = layui.jquery;
                var form = layui.form;
                form.render();
            });
        };
        $('body').on('click', '.del', function () {
            $(this).closest('tr').remove();
        });
        layui.use(['form', 'layer', 'upload', 'upload', 'layedit'], function () {
            $ = layui.jquery;
            var form = layui.form
                , upload = layui.upload
                , element = layui.element
                , layer = layui.layer
                , layedit = layui.layedit;
            layedit.set({
                //暴露layupload参数设置接口 --详细查看layupload参数说明
                uploadImage: {
                    url: '/Base/upload_img',
                    accept: 'image',
                    acceptMime: 'image/*',
                    exts: 'jpg|png|gif|bmp|jpeg',
                    size: '100240'
                }
                //右键删除图片/视频时的回调参数，post到后台删除服务器文件等操作，
                //传递参数：
                //图片： imgpath --图片路径
                //视频： filepath --视频路径 imgpath --封面路径
                , calldel: {
                    url: '/Base/upload_img'
                }
                //开发者模式 --默认为false
                , devmode: false
                //插入代码设置
                , codeConfig: {
                    hide: true,  //是否显示编码语言选择框
                    default: 'javascript' //hide为true时的默认语言格式
                }

                , tool: [
                    'strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right'
                ]
                , height: '300px'
            });
            //监听提交
            var infos = layedit.build('infos');
            form.on('submit(add)', function (data) {
                data.field.value = layedit.getContent(infos);
                //发异步，把数据提交给php
                $.ajax({
                    type: 'post',
                    data: data.field,
                    success: function (res) {
                        if (res.status == 0) {
                            layer.msg(res.msg, { icon: 6, time: 1000 }, function () {
                                // 获得frame索引
                                var index = parent.layer.getFrameIndex(window.name);
                                parent.location.reload();
                                parent.layer.close(index);
                            });
                        } else {
                            layer.msg(res.msg, { icon: 2, time: 1000 });
                        }
                    }
                });
                return false;
            });
        });
    </script>